package com.hl.ruoyilkshop.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hl.ruoyilkshop.mapper.UserHistoryMapper;
import com.hl.ruoyilkshop.domain.UserHistory;
import com.hl.ruoyilkshop.service.IUserHistoryService;

/**
 * 用户足迹Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-13
 */
@Service
public class UserHistoryServiceImpl implements IUserHistoryService 
{
    @Autowired
    private UserHistoryMapper userHistoryMapper;

    /**
     * 查询用户足迹
     * 
     * @param userId 用户足迹主键
     * @return 用户足迹
     */
    @Override
    public UserHistory selectUserHistoryByUserId(Long userId)
    {
        return userHistoryMapper.selectUserHistoryByUserId(userId);
    }

    /**
     * 查询用户足迹列表
     * 
     * @param userHistory 用户足迹
     * @return 用户足迹
     */
    @Override
    public List<UserHistory> selectUserHistoryList(UserHistory userHistory)
    {
        return userHistoryMapper.selectUserHistoryList(userHistory);
    }

    /**
     * 新增用户足迹
     * 
     * @param userHistory 用户足迹
     * @return 结果
     */
    @Override
    public int insertUserHistory(UserHistory userHistory)
    {
        return userHistoryMapper.insertUserHistory(userHistory);
    }

    /**
     * 修改用户足迹
     * 
     * @param userHistory 用户足迹
     * @return 结果
     */
    @Override
    public int updateUserHistory(UserHistory userHistory)
    {
        return userHistoryMapper.updateUserHistory(userHistory);
    }

    /**
     * 批量删除用户足迹
     * 
     * @param userIds 需要删除的用户足迹主键
     * @return 结果
     */
    @Override
    public int deleteUserHistoryByUserIds(Long[] userIds)
    {
        return userHistoryMapper.deleteUserHistoryByUserIds(userIds);
    }

    /**
     * 删除用户足迹信息
     * 
     * @param userId 用户足迹主键
     * @return 结果
     */
    @Override
    public int deleteUserHistoryByUserId(Long userId)
    {
        return userHistoryMapper.deleteUserHistoryByUserId(userId);
    }
}
